1. Field of the Invention
The present invention relates to computer graphic systems, and more particularly to computer graphic systems that display overlapping images using fragment shaders.
2. Description of the Related Art
Graphics processing is an important feature of modern high-performance computing systems. In graphic processing mathematical procedures are implemented to render, or draw, graphic primitives, e.g., a triangle or a rectangle, on a display to produce desired visual effects. Real time graphics processing is based on the high-speed processing of graphic primitives to produce visually pleasing moving images.
Some computer systems have the ability to display television signals and video images such as those produced by DVD players. Graphics processing and displaying video images are to some extent distinct capabilities. This is because most video images are not graphically processed but are produced in a manner that is very similar to that used in television sets (raster scanning of video signals). However, computer graphic display systems have architectures that are very different from that used in television.
FIG. 1 illustrates a simplified block diagram of a computer graphics system 100. As shown, a graphics processing unit 102 has a host interface/front end 104. The host interface/front end 104 receives raw graphics data from a central processing unit 103 that is running an application program stored in memory 105. The host interface/front end 104 buffers input information and supplies that information to a geometry engine 106. The geometry engine has access to a frame buffer memory 120 via a frame buffer interface 116.
The geometry engine 106 produces, scales, rotates, and projects three-dimensional vertices of graphics primitives in “model” coordinates that are stored in the frame buffer memory 120 into two-dimensional frame-buffer co-ordinates. Typically, triangles are used as graphics primitives for three-dimensional objects, but rectangles are often used for 2-dimensional objects (such as text displays).
The two-dimensional frame-buffer co-ordinates of the vertices of the graphics primitives from the geometry engine 106 are applied to a rasterizer 108. The rasterizer 108 identifies the positions of all of the pixels within the graphics primitives. This is typically performed along raster (horizontal) lines that extend between the lines that define the graphics primitives. The output of the rasterizer 108 is referred to as rasterized pixel data.
The rasterized pixel data are applied to a fragment shader 110 that processes input data (code, position, texture, conditions, constants, etc) using a fragment shader program (sequence of instructions) to generate output data. While fragment shaders are described in relation to their applications in graphics processing, fragment shaders are, in general, useful for other functions. Fragment shaders can be considered as a collection of processing capabilities that can handle large amounts of data at the same time, such as by parallel handling of data.
The fragment shader 110 includes a texture engine 112 that modifies the rasterized pixel data to have desired texture and optical features. The texture engine 112, which has access to the data stored in the frame buffer memory 120 via the frame buffer interface 116, can be implemented using a hardware pipeline comprised of one or more texture processing stations that process large amounts of data at very high speed. The processed pixel data is sent to a Raster Operations Processor 114 (Raster op in FIG. 1) that optionally performs additional processing on the shaded pixel data. The result is pixel data that is stored in the frame buffer memory 120 by the frame buffer interface 116. The frame pixel data can be used to produce images on a display 122.
Computer graphic systems such as that shown in FIG. 1 can be made programmable. In such designs, one processing station can be programmed to perform one set of operations, another processing station can be programmed to perform another set of operations, and so on. Such functionality has proven itself to be highly advantageous from an implementation perspective and highly desirable from a user perspective.
While computer graphic systems have proven themselves to be useful, new methods of operating them are being developed. Given that video signals, such as from a DVD player or a television program are usually processed as in televisions, a method of using a computer graphic system to produce complex video content by blending multiple images, including DVD and other video signals, would be beneficial.